/*
 * Agent.h
 *
 *  Created on: Mar 19, 2012
 *      Author: s146913
 */

#ifndef AGENT_H_
#define AGENT_H_

#include "conc/Thread.h"
#include "conc/Condition.h"
#include "conc/Mutex.h"
#include "Richting.h"
#include <iostream>
#include "BigBrother.h"

using namespace std;

class Agent : public Thread {
public:
	Agent(char* type, BigBrother* bb);
	Agent(char* type, int aantalDoorTeLaten, BigBrother* bb);
	Richting getKijkRichting();
	void run();
	void draai();
private:
	Richting kijkRichting;
	int aantalOmDoorTeLaten;
	int wachtHuidigeRichting;
	BigBrother* bigb;
	Condition* cCurrent;
	Mutex* mCurrent;
	void determineCurrentConditionAndMutex();
};

#endif /* AGENT_H_ */
